<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        document.onkeydown = function(event) {
            event = event || window.event;
            console.log('qianguyihao：键盘按下了');

            // 判断y和ctrl是否同时被按下
            if (event.ctrlKey && event.keyCode === 89) {
                console.log('ctrl和y都被按下了');
            }
        };
    </script>
</body>

</html>